<?php
	$file = file('ticket_table\table_header.html');
	foreach($file as $line):
		echo $line;
	endforeach;
	$file = file('ticket_table\table_footer_and_buttons.html');
	foreach($file as $line):
		echo $line;
	endforeach;
?>
<div id="errorMessage">
</div>
<table style="border-color:black;text-align:center;" width="700" border="1" align="center" cellpadding="2" cellspacing="1" bgcolor="#EEE">
	<tr>
		<th>
			Ticket #
		</th>
		<th>
			Received
		</th>
		<th>
			Sender Name
		</th>
		<th>
			Sender Email
		</th>
		<th>
			Subject
		</th>
		<th>
			Tech
		</th>
		<th>
			Status
		</th>
		<th>
			Select
		</th>
	</tr>
	<tr>
		<td>Sort by <input checked type='radio' name='selectedSort' value='ticket'></td>
		<td>Sort by <input type='radio' name='selectedSort' value='received'></td>
		<td>Sort by <input type='radio' name='selectedSort' value='senderName'></td>
		<td>Sort by <input type='radio' name='selectedSort' value='senderEmail'></td>
		<td>Sort by <input type='radio' name='selectedSort' value='subject'></td>
		<td>Sort by <input type='radio' name='selectedSort' value='tech'></td>
		<td>Sort by <input type='radio' name='selectedSort' value='status'></td>
	<tr>
	<tr>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td><input checked type='radio' name='selectedTicket' value='0'></td>
	<tr>
	<tr>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td>that data though</td>
		<td><input type='radio' name='selectedTicket' value='0'></td>
	<tr>
</table>
<div style="width:680px; min-height: 50px; background-color:#EEE; margin: 5px auto; padding:10px;
		border-radius:5px;">
	<div style="margin:10px; text-align:center;">
		<input style="margin-right:50px; width: 170px;" type='submit' name='viewAllTicketsSubmit' value='View All Tickets'>
		<input style="margin-right:50px; width: 170px;" type='submit' name='viewAllTicketsSubmit' value='Sort'>
		<input style="width: 170px;" type='submit' name='viewSelectedTicketSubmit' value='View Selected Ticket'>
	</div>
	<div style="margin:10px; text-align:center;">
		<input style="margin-right:50px; width: 170px;" type='submit' name='viewMyTicketsSubmit' value='View My Tickets'>
		<input style="margin-right:50px; width: 170px;" type='submit' name='logoutSubmit' value='Logout'>
		<input style="width: 170px;" type='submit' name='viewUnassignedTicketsSubmit' value='View Unassigned Tickets'>
	</div>
</div>

<?php
	concatElementByID("errorMessage", "<br/>abc");

	function concatElementByID($elementID, $text)
	{
		echo "<script>";
		echo "var current = document.getElementById('$elementID').innerHTML ;
				document.getElementById('$elementID').innerHTML = current + '$text'";
		echo "</script>";
	}
?>